<?php
/* @var $this OrdCommentController */
/* @var $model OrdComment */
/* @var $form CActiveForm */
?>
<div class="hr_12"></div>
<div class="w_rate pub_tab">
	<div class="tab_hd2">
		<ul class="c_f">
		<li class="select"><a href="javascript:">给商品的评价<b class="mem_bgx left"></b><b class="mem_bgx right"></b></a></li>
		</ul>
	</div>
    <!--给商品的评价  start-->
	<?php $form=$this->beginWidget('CActiveForm', array(
		'id'=>'ord-comment-form',
		'enableAjaxValidation'=>false,
		'enableClientValidation'=>true,	
		'clientOptions'=>array('validateOnSubmit'=>true),
	)); ?>
           <div class="tab_cont2">
                <div class="hd">
                	<span class="ml">订单编号：<?php echo $order->zo_id?></span>
                	<span class="ml">商家名称：<a class="c_06c mr5" href="javascript:" title="">家猫商城</a></span>
                	<span class="ico_qq qq_online2">在线客服</span>
                </div>
                <div class="bd">
                    <ul class="rate_li">
                        <?php foreach ($order->orderProduct as $value) {?>
                        <li class="c_f">
                            <div class="pro f_l">
                                 <input type="hidden" id="productid" name="comment[<?php echo $value->zop_id?>][zp_id]" value="<?php echo $value->zp_id?>" />
                                <input type="hidden"  name="comment[<?php echo $value->zop_id?>][zm_id]" value="<?php echo $value->zm_id?>"/>
                                <div class="c_img c_img60">
                                    <?php echo CHtml::link(Tool::thumb($value->zop_pic,60,60,$value->zop_title),array('/home/product/detail/','id'=>$value->zp_id))?>
                                </div>
                                <p class="title_pro line_18">
                                    <?php echo CHtml::link($value->zop_title,array('/home/product/detail/','id'=>$value->zp_id),array('class'=>'c_06c','title'=>$value->zop_title))?>
                                </p>
                                <p class="other c_999">
                                        <?php $prospe = unserialize($value->zop_spe)?>
                                        <?php foreach($prospe as $name=>$spe){?>
                                                <span><?php echo $spe;?></span>
                                        <?php }?>
                                </p>
                            </div>
                            <div class="rate f_r">
                                <div class="pro_rating">
                                    <span class="mr">
                                        <input class="radio" type="radio" name="comment[<?php echo $value->zop_id?>][zoc_sum]" value="3" <?php echo (empty($value->comment)||$value->comment->zoc_sum==3)?'checked':'';?>/>
                                        <em class="mem_ico rate_good"></em>好评
                                    </span>
                                    <span class="mr">
                                        <input class="radio" type="radio" name="comment[<?php echo $value->zop_id?>][zoc_sum]" value="2" <?php echo (!empty($value->comment)&&$value->comment->zoc_sum==2)?'checked':'';?>/>
                                        <em class="mem_ico rate_normal"></em>中评
                                    </span>
                                    <span class="mr">
                                        <input class="radio" type="radio" name="comment[<?php echo $value->zop_id?>][zoc_sum]" value="1" <?php echo (!empty($value->comment)&&$value->comment->zoc_sum==1)?'checked':'';?>/>
                                        <em class="mem_ico rate_bad"></em>差评
                                    </span>
                                </div>
                                <p class="rate_text"><textarea class="t_area" name="comment[<?php echo $value->zop_id?>][zoc_content]"><?php echo !empty($value->comment)?$value->comment->zoc_content:"";?></textarea></p>
                                <p class="words c_666">可以输入500字</p>
                            </div>
                        </li>
                        <?php }?>                        
                    </ul>
                    <div class="shop_rate">
                        <h3>店铺动态评分</h3>
                        <div class="box c_f">
						<div class="rating f_l">
							<div class="shop_rating"> <span class="f_l c_666">宝贝与描述相符：</span>
								 <span class="p_rate" id="p_rate1">
									 <i title="1分" <?php echo (!empty($order->comment)&&$order->comment->zoc_product==1)?'class="select"':'';?>></i> 
									 <i title="2分" <?php echo (!empty($order->comment)&&$order->comment->zoc_product==2)?'class="select"':'';?>></i> 
									 <i title="3分" <?php echo (!empty($order->comment)&&$order->comment->zoc_product==3)?'class="select"':'';?>></i> 
									 <i title="4分" <?php echo (!empty($order->comment)&&$order->comment->zoc_product==4)?'class="select"':'';?>></i> 
									 <i title="5分" <?php echo (!empty($order->comment)&&$order->comment->zoc_product==5)?'class="select"':'';?>></i> 
								</span>
								<span class="result" id="stars1_tips"><?php echo !empty($order->comment)?$order->comment->zoc_product."分":""?></span>
								<input type="hidden" id="stars1_input" name="rate[zoc_product]" value="<?php echo !empty($order->comment)?$order->comment->zoc_product:""?>" size="2" />
							</div>
							<div class="shop_rating"> <span class="f_l c_666">卖家的服务态度：</span>
								 <span class="p_rate" id="p_rate2">
									 <i title="1分" <?php echo (!empty($order->comment)&&$order->comment->zoc_service==1)?'class="select"':'';?>></i> 
									 <i title="2分" <?php echo (!empty($order->comment)&&$order->comment->zoc_service==2)?'class="select"':'';?>></i> 
									 <i title="3分" <?php echo (!empty($order->comment)&&$order->comment->zoc_service==3)?'class="select"':'';?>></i> 
									 <i title="4分" <?php echo (!empty($order->comment)&&$order->comment->zoc_service==4)?'class="select"':'';?>></i> 
									 <i title="5分" <?php echo (!empty($order->comment)&&$order->comment->zoc_service==5)?'class="select"':'';?>></i> 
								</span>
								<span class="result" id="stars2_tips"><?php echo !empty($order->comment)?$order->comment->zoc_service."分":""?></span>
								<input type="hidden" id="stars2_input" name="rate[zoc_service]" value="<?php echo !empty($order->comment)?$order->comment->zoc_service:""?>" size="2" />
							</div>
							<div class="shop_rating"> <span class="f_l c_666">卖家发货的速度：</span>
								 <span class="p_rate" id="p_rate3">
									 <i title="1分" <?php echo (!empty($order->comment)&&$order->comment->zoc_express==1)?'class="select"':'';?>></i> 
									 <i title="2分" <?php echo (!empty($order->comment)&&$order->comment->zoc_express==2)?'class="select"':'';?>></i> 
									 <i title="3分" <?php echo (!empty($order->comment)&&$order->comment->zoc_express==3)?'class="select"':'';?>></i> 
									 <i title="4分" <?php echo (!empty($order->comment)&&$order->comment->zoc_express==4)?'class="select"':'';?>></i> 
									 <i title="5分" <?php echo (!empty($order->comment)&&$order->comment->zoc_express==5)?'class="select"':'';?>></i> 
								</span>
								<span class="result" id="stars3_tips"><?php echo !empty($order->comment)?$order->comment->zoc_express."分":""?></span>
								<input type="hidden" id="stars3_input" name="rate[zoc_express]" value="<?php echo !empty($order->comment)?$order->comment->zoc_express:""?>" size="2" />
							</div>
						</div>

                            <div class="rate_tip mem_bg f_l"><span class="txt c_666">小提示：点击星星就能打分了</span></div>
                        </div>
                    </div>
                    <div class="submit">
                    		<?php echo CHtml::submitButton('提交评论',array('class'=>'mem_btn mem_btn05 mr5')); ?>
                    </div>
                </div>
            </div>
	<?php $this->endWidget(); ?>
</div>
<script type="text/javascript" src="<?php echo Yii::app()->homeUrl?>/js/rate_code.js"></script> 